﻿using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.CMKAppService
{
    public class CMKAppService : ICMKAppService
    {
        private readonly ICMKRepository cMKrepository;

        public CMKAppService(ICMKRepository cMKrepository)
        {
            this.cMKrepository = cMKrepository;
        }

		public Task<List<CMK>> GetCMKAsyncById(int id)
		{
            return cMKrepository.GetCMKAsyncById(id);
		}

		/// <summary>
		/// 查询
		/// </summary>
		/// <returns></returns>
		public Task<List<CMK>> SelectCMKAsync()
        {
            return cMKrepository.SelectCMKAsync() ;
        }
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="cmk"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        Task<bool> ICMKAppService.AddCMKAsync(CMK cmk)
        {
            return cMKrepository.AddCMKAsync(cmk);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        Task<bool> ICMKAppService.DeleteCMKAsync(int id)
        {
            return cMKrepository.DeleteCMKAsync(id);
        }
    }
}
